#!/usr/bin/env node

const http = require('https'),
      log = console.log;

const addr = "https://gitee.com/api/v5/users/han-meihui/repos?access_token=d2458be30cb4e1443f0f8b9cad152480&type=all&sort=full_name&page=1&per_page=20";

http.get(addr, (res) => {
  //log(`HTTP/${res.httpVersion} ${res.statusCode} ${res.statusMessage}`)
  //log(res.headers)
  //log()
  let data = ''
  res.on('data', (chunk) => {
    data += chunk
  })

  res.on('end', () => {
    data = JSON.parse(data)
    for(const repos of data) {
        log(repos.html_url);
   }
  })
})
